<div class="row">
  <div class="col-sm-10 col-sm-push-1">
    <form action="#" method="post" class="form form-horizontal" [formGroup]="siteForm">
      <div class="one-form-header"></div>
      <div class="one-form-body">
        <div class="row">
          <div class="col-lg-3 col-md-4">
            <input type="text" class="form-control" id="serach_regionName"  value="" placeholder="按Enter键搜索"  (change)="enterSearch()">
            <div class="one-ztree-type">区域</div>
            <ul id="user_update_orgTree" class="ztree one-ztree-search" style="height: 490px;max-height: 490px"> </ul>
          </div>


          <div class="col-lg-2 col-md-4">
            <select class="multiselect form-control" id="org_type" (change)="entOrGovChange(govOrEnt)" #govOrEnt>
              <option value="gov">政府</option>
              <option value="ent">企业</option>
            </select>
            <label style="width: 100%;font-weight: normal;">政府机构：
              <input type="text" class="form-control" style="display: inline;width: 63%;" id="serach_gov_ent" value="" placeholder="按Enter键搜索" (change)="searchGovOrEnt()">
            </label>
            <ul id="site_update_entAndGov" class="ztree" style="height: 456px;max-height: 525px">
              <li *ngFor="let info of govOrCompany;" (click)="govOrcompanyInfo(info)" style="margin: 10px"> {{info.name}}</li>
            </ul>
          </div>


          <div class="col-lg-6 col-md-8">
            <div class="form-group">
              <label for="site_add_regionCode" class="col-xs-3 control-label"><span style="color: red;">*</span> 行政区划:</label>
              <div class="col-xs-9">
                <input type="hidden" class="form-control" id="site_add_regionCode" formControlName="regionCode">
                <input type="text" class="form-control" placeholder="行政区划" id="site_add_regionName" formControlName="regionName" maxlength="50" readonly>
                <div *ngIf="formErrors.regionCode" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.regionCode}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_orgId" class="col-xs-3 control-label"><span style="color: red;">*</span> 企业/机构:</label>
              <div class="col-xs-9">
                <input type="hidden" class="form-control" id="site_add_orgId"formControlName="orgId" >
                <input type="text" class="form-control" placeholder="企业/机构" id="site_add_orgName" formControlName="orgName" maxlength="30" readonly>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_siteName" class="col-xs-3 control-label"><span style="color: red;">*</span> 站点名字:</label>
              <div class="col-xs-9">
                <input type="hidden" id="id" formControlName="id" name="id">
                <input type="text" class="form-control" placeholder="站点名字" id="site_add_siteName" required formControlName="siteName" maxlength="50">
                <div *ngIf="formErrors.siteName" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.siteName}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_address" class="col-xs-3 control-label"><span style="color: red;">*</span> 站点位置:</label>
              <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="站点位置" id="site_add_address" formControlName="address" maxlength="50">
                <div *ngIf="formErrors.address" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.address}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_studyRegionName" class="col-xs-3 control-label">学习城市代码:</label>
              <div class="col-xs-9">
                <input type="hidden" id="studyRegionCode" formControlName="studyRegionCode" name="studyRegionCode">
                <input type="text" class="form-control" placeholder="学习城市代码" id="site_add_studyRegionName" formControlName="studyRegionName" (focus)="getStudyCityCode()">
                <div *ngIf="formErrors.studyRegionCode" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.studyRegionCode}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_studySiteName" class="col-xs-3 control-label">学习标准站:</label>
              <div class="col-xs-9">
                <input type="hidden" id="studySiteCode" formControlName="studySiteCode" name="studySiteCode">
                <input type="text" class="form-control" placeholder="学习标准站" id="site_add_studySiteName" formControlName="studySiteName" maxlength="30" readonly>
                <div *ngIf="formErrors.studySiteCode" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.studySiteCode}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_linkMan" class="col-xs-3 control-label">站点联系人:</label>
              <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="站点联系人" id="site_add_linkMan" formControlName="linkMan" maxlength="25">
                <div *ngIf="formErrors.linkMan" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.linkMan}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="site_add_contactTel" class="col-xs-3 control-label">站点联系电话:</label>
              <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="站点联系电话" id="site_add_contactTel" formControlName="contactTel" maxlength="14">
                <div *ngIf="formErrors.contactTel" class="has-error">
                  <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.contactTel}} </label>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label for="monitor_add_siteTypeCode" class="col-xs-3 control-label" ><span style="color: red;">*</span> 站点类型:</label>
              <div class="col-xs-9">
                <!-- 下拉框 -->
                <select class="multiselect" id="monitor_add_siteTypeCode" class="form-control" formControlName="siteTypeCode" required>
                  <option value="">-- 请选择站点类型 --</option>
                  <option *ngFor="let category of categorys" [value]="category.siteTypeCode">{{category.remark}}</option>
                </select>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label">所属机构类型:</label>
              <div class="col-xs-9" >
                <div class="row">
                  <div class="col-xs-4">
                    <input type="radio" id="site_orgtype" value="0" formControlName="orgType">
                    <label for="site_isThied_yes">
                      企业
                    </label>
                  </div>
                  <div class="col-xs-4">
                    <input type="radio"  formControlName="orgType" id="site_org_type" checked value="1">
                    <label for="site_isThied_no">
                      政府
                    </label>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label">是否属第三方:</label>
              <div class="col-xs-9" >
                <div class="row">
                  <div class="col-xs-4">
                    <input type="radio" id="site_isThied_yes" value="1" formControlName="isThied">
                    <label for="site_isThied_yes">
                      是
                    </label>
                  </div>
                  <div class="col-xs-4">
                    <input type="radio"  formControlName="isThied" id="site_isThied_no" checked value="0">
                    <label for="site_isThied_no">
                      否
                    </label>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label">是否为移动设备:</label>
              <div class="col-xs-9" >
                <div class="row">
                  <div class="col-xs-4">
                    <input type="radio" id="site_isMove_yes" value="1" formControlName="isMove">
                    <label for="site_isMove_yes">
                      是
                    </label>
                  </div>
                  <div class="col-xs-4">
                    <input type="radio"  formControlName="isMove" id="site_isMove_no" checked value="0">
                    <label for="site_isMove_no">
                      否
                    </label>
                  </div>
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-3 control-label">是否启用:</label>
              <div class="col-xs-9" >
                <div class="row">
                  <div class="col-xs-4">
                    <input type="radio" id="site_isUse_yes" value="1" formControlName="isUse">
                    <label for="site_isUse_yes">
                      启用
                    </label>
                  </div>
                  <div class="col-xs-4">
                    <input type="radio" formControlName="isUse" id="site_isUse_no" checked value="0">
                    <label for="site_isUse_no">
                      禁用
                    </label>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="one-form-footer">
        <div class="row">
          <div class="col-lg-10 col-md-12 text-right">
            <button class="btn btn-default" type="reset" (click)="cancelSiteUpdate()">取消</button>
            <button class="btn btn-success" type="button" [disabled]="!siteForm.valid" (click)="onSubmit()" >保存</button>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
